package legumes.client.evt.customer;

import com.google.gwt.event.shared.GwtEvent;

public class CustomerOrderChangedEvent extends GwtEvent<CustomerOrderChangedEventHandler> {

	public static Type<CustomerOrderChangedEventHandler> TYPE = new Type<CustomerOrderChangedEventHandler>();
	
	private boolean priceAdded;
	private float price;
	
	public CustomerOrderChangedEvent(boolean priceAdded_, float price_) {
		priceAdded = priceAdded_;
		price = price_;
	}
	
	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<CustomerOrderChangedEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(CustomerOrderChangedEventHandler handler) {
		handler.onOrderChanged(this);
	}

	public boolean isPriceAdded() {
		return priceAdded;
	}

	public float getPrice() {
		return price;
	}

}
